#!/bin/sh

wget http://libregamenight.xyz/pub/0ad/data/data.deb
sudo dpkg -i data.deb

if [ $(arch) = "x86_64" ]
    then
        wget http://libregamenight.xyz/pub/0ad/data/amd64.deb
        sudo dpkg -i amd64.deb
        if [ $? -eq 1 ]
        then
            sudo apt-get install -f
            sudo dpkg -i amd64.deb
        fi
    else
        wget http://libregamenight.xyz/pub/0ad/data/i386.deb
        sudo dpkg -i i386.deb
        if [ $? -eq 1 ]
        then
            sudo apt-get install -f
            sudo dpkg -i i386.deb
        fi
fi


echo "Time to reap the profits, now!"
echo "If everything, went smoothly, gamename is now installed-- it should be in your Games menu."
echo "Cheers!"
